<?php 
$CI =& get_instance();
if($CI->router->directory === 'admin/'){
    $cur_directory = 'admin';
}else{
    $cur_directory = 'nursery';
}
?>
<div id="navbar" class="navbar navbar-default">
	<script type="text/javascript">
		try{ace.settings.check('navbar' , 'fixed')}catch(e){}
	</script>

	<div class="navbar-container" id="navbar-container">
		<div class="navbar-header pull-left">
			<!-- #section:basics/navbar.layout.brand -->
			<a href="<?php echo base_url()?>admin/" class="navbar-brand">
				<small>
					<i class="fa fa-leaf"></i>
					叮咚老师管理后台
				</small>
			</a>

		</div>

		<!-- #section:basics/navbar.dropdown -->
		<div class="navbar-buttons navbar-header pull-right" role="navigation">
			<ul class="nav ace-nav">
				<!-- #section:basics/navbar.user_menu -->
				<li class="light-blue">
					<a data-toggle="dropdown" href="#" class="dropdown-toggle">
						<img class="nav-user-photo" src="<?php echo base_url()?>public/assets/avatars/user.jpg" alt="Jason's Photo" />
						<span class="user-info">
							<small>Welcome,</small>
							<?php echo 'admin' == $cur_directory ? $this->session->userdata('admin_username') : $this->session->userdata('nusername');?>
						</span>

						<i class="ace-icon fa fa-caret-down"></i>
					</a>

					<ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
						<li>
							<a href="<?php echo base_url()?><?php echo 'admin' == $cur_directory ? 'admin/manage' : 'nursery/admin';?>/set">
								<i class="ace-icon fa fa-cog"></i>
								Settings
							</a>
						</li>

						<li class="divider"></li>

						<li>
							<a href="<?php echo base_url()?><?php echo 'admin' == $cur_directory ? 'admin' : 'nursery';?>/login/logout">
								<i class="ace-icon fa fa-power-off"></i>
								Logout
							</a>
						</li>
					</ul>
				</li>

				<!-- /section:basics/navbar.user_menu -->
			</ul>
		</div>

		<!-- /section:basics/navbar.dropdown -->
	</div><!-- /.navbar-container -->
</div>



